From: Florian Müllner Date: Thu, 28 Jun 2012 10:22:17 +0000 (+0200) Subject: userMenu: Move "Power off" item to the bottom X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6403 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=698fb64be9f4abf5798ca4361a05831758ff5fb5;p=gnome-shell.git userMenu: Move "Power off" item to the bottom The current position below "System Settings" is problematic - the items are unrelated, and misclicks will result in a scary system modal dialog that has to be cancelled. Move items around a bit to avoid this problem. https://bugzilla.gnome.org/show_bug.cgi?id=678887 --- diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index 41bf99889..807e1192f 100644 --- a/js/ui/userMenu.js +++ b/js/ui/userMenu.js @@ -692,13 +692,6 @@ const UserMenuButton = new Lang.Class({ this.menu.addMenuItem(item); } - item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"), - _("Suspend")); - this.menu.addMenuItem(item); - item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate)); - this._suspendOrPowerOffItem = item; - this._updateSuspendOrPowerOff(); - item = new PopupMenu.PopupSeparatorMenuItem(); this.menu.addMenuItem(item); @@ -712,13 +705,20 @@ const UserMenuButton = new Lang.Class({ this.menu.addMenuItem(item); this._logoutItem = item; - item = new PopupMenu.PopupSeparatorMenuItem(); - this.menu.addMenuItem(item); - item = new PopupMenu.PopupMenuItem(_("Lock")); item.connect('activate', Lang.bind(this, this._onLockScreenActivate)); this.menu.addMenuItem(item); this._lockScreenItem = item; + + item = new PopupMenu.PopupSeparatorMenuItem(); + this.menu.addMenuItem(item); + + item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"), + _("Suspend")); + this.menu.addMenuItem(item); + item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate)); + this._suspendOrPowerOffItem = item; + this._updateSuspendOrPowerOff(); }, _updatePresenceStatus: function(item, event) {